home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Plotting / NXplot3d.3.2 / Source / function.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-16  |  175 b   |  14 lines

  1. #include <math.h>
  2.  
  3. int NFN=2;
  4.  
  5. float function(int set,float x,float y)
  6. {
  7. float r;
  8. r=sqrt(x*x+y*y);
  9. if (set==0) return(cos(r));
  10. if (set==1) return(cos(r+.75));
  11. return(0.0);
  12.  
  13. }
  14.